package com.acme.task2;

public class Foo {
    public final String FIN = "Finalize called on foo object number ";
    private int iteration;

    public Foo(int i) {
        iteration = i + 1;
    }

    @Override
    protected void finalize() throws Throwable {
        System.out.println(FIN + iteration);
        super.finalize();
    }
}
